#include <cstdio>
#include <cmath>
int main()
{
    int N;
    scanf("%d", &N);
    int tmp, tmpCnt;
    int sqrtN = sqrt(N);
    int count = 0; //Record the count of biggest num of consecutive factors
    int begin;     //Record the first factor of the consecutive factors
    for (int i = 2; i <= sqrtN; ++i)//必须为小于等于sqrtN
    {//遍历到根号N，每次遍历当中再进行一个子循环            
        tmp = N; //Reset tmp
        tmpCnt = 0;
        for (int j = i; j < N; ++j)
        {
            if (tmp % j == 0)
            {//从当前遍历数字开始再往后遍历，直到不能N的因子不能再被连续序列中的数字整除的时候跳出子循环
                tmp /= j;
                ++tmpCnt;
            }
            else
            {
                break;
            }
        }
        if (tmpCnt > count)
        {
            begin = i;
            count = tmpCnt;
        }
    }
    if (count != 0)
    {
        printf("%d\n", count);
        for (int i = 0; i < count - 1; ++i)
        {
            printf("%d*", begin + i);
        }
        printf("%d\n", begin + count - 1);
    }
    else
    {
        printf("1\n");
        printf("%d\n", N);
    }
    return 0;
}